package com.codeduck.test.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codeduck.test.entity.AlarmInfo;
import com.codeduck.test.entity.TransDtl;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: <a href="mailto:codeduck@163.com">codeduck</a>
 * @date: 2022/10/26
 */
@Mapper
public interface AlarmInfoMapper extends BaseMapper<AlarmInfo> {

    @Select("select * from t_alarm_info limit #{current},#{size}")
    List<AlarmInfo> getList(@Param("current") int current, @Param("size") int size);

    int selectPartitionRecordCount(@Param("part") String part);
    int batchInsert(@Param("alarmInfoList") List<AlarmInfo> alarmInfoList);
    int partitionDataCleaning(@Param("part") String part, @Param("size") int size);
    int deleteAll();
}
